package cn.zyq.ykb.controller.h5.config;

import org.springframework.security.access.prepost.PreAuthorize;
import cn.zyq.ykb.system.ry.util.poi.ExcelUtil;
import cn.zyq.ykb.system.common.BaseController;
import cn.zyq.ykb.system.annotation.Log;
import cn.zyq.ykb.system.ry.enums.BusinessType;
import cn.zyq.ykb.beans.config.ConfigHelp;
import cn.zyq.ykb.service.config.ConfigHelpService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import cn.zyq.ykb.system.common.BaseController;
import cn.zyq.ykb.system.common.PageParam;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 配置-帮助手册Controller
 *
 * @author SystemAuth
 * @date 2023-11-27
 */

@RestController(value = "H5ConfigHelpController")
@RequestMapping("/api/configHelp")
@Api(tags = "配置-帮助手册接口")
public class ConfigHelpController extends BaseController {

    @Autowired
    private ConfigHelpService configHelpService;

    /**
     * 查询配置-帮助手册列表
     */
    @ApiOperation(value = "列表", response = ConfigHelp.class)
    @PostMapping("/list")
    public Object list(@RequestBody PageParam pageParam) {
        return this.configHelpService.selectConfigHelpList(pageParam);
    }

    /**
     * 获取配置-帮助手册详细信息
     */
    @ApiOperation(value = "详情", response = ConfigHelp.class)
    @GetMapping(value = "/{configHelpID}")
    public Object getInfo(@PathVariable("configHelpID") Integer configHelpID) {
        return this.configHelpService.selectConfigHelpByConfigHelpID(configHelpID);
    }

}
